1. Field of the Invention
The present invention relates to image compression, and more particularly, to a method and apparatus for encoding and decoding image data.
2. Description of the Related Art
A color image is encoded after a color conversion is performed. For example, an R (Red), G (Green), and B (Blue) image is converted into a YCbCr image and separated into a luminance component and a chrominance component in order to encode the color image. This results in increasing an encoding efficiency since converting the RGB image into the YCbCr image removes redundant information between chrominance components. An integer transformation method using a lifting method, e.g., YCoCg-R by MICROSOFT®, has been developed in this regard.
Prediction encoding is performed for each of the chrominance components, i.e., RGB, of the color image. The redundant information among the RGB chrominance components is not used for the prediction encoding. Therefore, correlations among the RGB chrominance components are not used to encode each of the RGB chrominance components, thereby reducing the encoding efficiency.
The redundant information among the RGB chrominance components is removed using a temporal prediction (referred to as an Inter prediction) and a spatial prediction (referred to as an Intra prediction) in order to encode a converted image, thereby obtaining a residue image. According to H.264/MPEG-4 pt. 10 AVC standard technology (“Text of ISO/IEC FDIS 14496-10: Information Technology—Coding of audio-visual objects—Part 10: Advanced Video Coding”, ISO/IEC JTC 1/SC 29/WG 11, N5555, March, 2003), which has been developed by the Joint Video Team (JVT) of the ISO/IEC MPEG and ITU-T VCEG groups, a variety of spatial and temporal prediction encoding methods are used to increase the encoding efficiency.
A quadtree dividing method used to encode a color image is illustrated in FIGS. 1A and 1B. FIG. 1A illustrates sub-blocks divided from divided blocks using the quadtree dividing method. FIG. 1B is a tree structure illustrating information of pixel values of divided sub-blocks. Referring to FIGS. 1A and 1B, the quadtree dividing method is used to divide a block to be encoded into four sub-blocks, and divide each of four sub-blocks into four sub-blocks, thereby encoding pixel values of sub-blocks as tree-structured information.
However, the conventional encoding method reduces a compression efficiency of the color image, while increasing the compression efficiency causes degradation of the color image.